<?php

$username = trim($_POST['username']);
$password = $_POST['password'];
$cpassword = $_POST['cpassword'];
$email = $_POST['email'];

//数据验证
if(empty($username) || empty($password) || empty($password) || $cpassword != $password){
	echo '数据输入不完整';
	exit;
}else{
	if(strlen($password) <6 || strlen($cpassword) > 30){
		echo '密码必须在6位到30位之间';
	}
	$pattern = '';
	if(!prea_match($pattern,$email)){
		echo 'Email格式不合法！';
		exit;
	}
}


?>